home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
CUGUK
/
C005.ZIP
/
AMORTIZ
/
AMORTIZ2.C
next >
Wrap
Text File
|
1990-01-19
|
1KB
|
46 lines
/********************************************************************
* C Users Group (U.K) C Source Code Library File CUGLIB.005 *
* Inquiries to: M. Houston, 36 Whetstone Clo. Farquhar Rd. *
* Edgbaston, Birmingham B15 2QN ENGLAND *
********************************************************************
* File name: amortiz2.c
* Program name:
* Source of file: The Public Domain Software Library.
* Purpose: interest rate calculations.
* Changes: <who what when & why major changes have been made>
********************************************************************/
/** determine payment if balance and rate and term is known
*amount = starting balance
*balance = remaining balance
*rate = interest rate per period
*rate1 = interest rate per year
*payment = monthly payment
*principal = payment to principle
*interest = payment of interest per period
*number = number of payments
* payment=Balance/((1-(1+rate)^-Number)/rate)
*/
float amount; /* declare external veriables */
float rate;
float payment;
float rate1;
#include "math.h" /* include declaration for pow() */
pymt()
{
float number;
printf("How many payments ? ");
scanf("%f",&number);
payment = amount / ((1 - pow((1. + rate),-number))/rate);
}